<template>
    <div class="">
        <!-- 面包屑导航 -->
        <el-bread></el-bread>
        <!-- 添加按钮 -->
        <el-button class="btnInfo" @click="adddialog"
         type="primary" size="small" plain>添加</el-button>
        <!-- 列表展示表格 -->
        <v-list @edit="edit"></v-list>
        <!-- 弹框的展示 -->
        <v-dialog :isShow=isShow :isadd=isadd @cancel="cancel" ref="diainfo"></v-dialog>
    </div>
</template>
<script>
import vList from './list.vue'
import vDialog from './dialog.vue'
export default {
    data() {
        return {
            isShow: false,
            isadd:true
        }
    },
    components: {
        vList,vDialog
    },
    methods: {
        adddialog() {
            this.isShow = true
            this.isadd=true
        },
        cancel(e){
            this.isShow=e
        },
        edit(e){
            this.isShow=true
            this.isadd=false
            // console.log(e);
            this.$refs.diainfo.lookup(e)
        }
    }
}
</script>
<style scoped >
.btnInfo {
    margin: 10px 5px;
}
</style>